package com.center.biz.impl;

import com.center.api.model.SysFunction;
import com.center.api.remote.RemoteSysFunctionService;
import com.center.biz.dao.SysFunctionMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "10",interfaceClass = RemoteSysFunctionService.class)
public class RemoteSysFunctionServiceImpl implements RemoteSysFunctionService{

    @Autowired
    private SysFunctionMapper sysFunctionMapper;

    @Override
    public int save(SysFunction sysFunction) {
        return sysFunctionMapper.insertSelective(sysFunction);
    }

    @Override
    public int update(SysFunction sysFunction) {
        return sysFunctionMapper.updateByPrimaryKeySelective(sysFunction);
    }

    @Override
    public int delete(int id) {
        return sysFunctionMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<SysFunction> select(SysFunction sysFunction) {
        return sysFunctionMapper.select(sysFunction);
    }

    @Override
    public SysFunction getById(int id) {
        return sysFunctionMapper.selectByPrimaryKey(id);
    }
}
